<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>四川票务网</title>
    <link rel="stylesheet" href="/layui/css/layui.css">

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">四川票务网</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="#">首页</a></li>
            <li class="layui-nav-item"><a href="">购买车票</a></li>
            <li class="layui-nav-item"><a href="">订单查询</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">积分系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="/user/reg.html">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    注册
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/user/login.html">登录</a></li>
        </ul>
    </div>



    <div class="">
        <!-- 内容主体区域 -->
<!--        出发地, 目的地, 时间选择区-->
        <form class="layui-form" action="" lay-filter="example" style="width: 420px;position: fixed;top:100px;z-index: +1;color: #FFFFFF">
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="出发城市" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <input type="password" name="password" placeholder="到达城市" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">

                    <input type="text"  placeholder="乘车时间"  class="layui-input" id="time1">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="demo1">立即搜索</button>
                </div>
            </div>
        </form>

<!--        轮播区域-->
        <div class="layui-carousel" id="test10">

            <div carousel-item="">
                <div><img src="https://fdfs.tz12306.com/group1/M00/00/3D/wKgJPl0G-1WAJSwfAAobbltXMUM861.jpg"></div>
                <div><img src="https://fdfs.tz12306.com/group1/M00/00/1F/wKgJPlxj65WAWOoMABHgSUcKIcM795.jpg"></div>
                <div><img src="https://fdfs.tz12306.com/group1/M00/00/1E/wKgJJFsQMIqAfrvBAAVShLkVB4U366.jpg"></div>

            </div>
        </div>

    </div>

    <div class="">
        <img src="https://image.scqckypw.com/static/new/images/homestep_index.jpg" width="100%">
<!--        &lt;!&ndash; 底部固定区域 &ndash;&gt;-->
<!--        © layui.com - 底部固定区域-->
    </div>

</div>
<script src="/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
<script>
    layui.use(['carousel', 'form'], function(){
        var carousel = layui.carousel
            ,form = layui.form;

        //常规轮播
        carousel.render({
            elem: '#test1'
            ,arrow: 'always'
        });

        //改变下时间间隔、动画类型、高度
        carousel.render({
            elem: '#test2'
            ,interval: 1000
            ,anim: 'fade'
            ,height: '120px'
        });

        //设定各种参数
        var ins3 = carousel.render({
            elem: '#test3'
        });
        //图片轮播
        carousel.render({
            elem: '#test10'
            ,width: '100%'
            ,height: '440px'
            ,interval: 3000
        });

        //事件
        carousel.on('change(test4)', function(res){
            console.log(res)
        });

        var $ = layui.$, active = {
            set: function(othis){
                var THIS = 'layui-bg-normal'
                    ,key = othis.data('key')
                    ,options = {};

                othis.css('background-color', '#5FB878').siblings().removeAttr('style');
                options[key] = othis.data('value');
                ins3.reload(options);
            }
        };

        //监听开关
        form.on('switch(autoplay)', function(){
            ins3.reload({
                autoplay: this.checked
            });
        });

        $('.demoSet').on('keyup', function(){
            var value = this.value
                ,options = {};
            if(!/^\d+$/.test(value)) return;

            options[this.name] = value;
            ins3.reload(options);
        });

        //其它示例
        $('.demoTest .layui-btn').on('click', function(){
            var othis = $(this), type = othis.data('type');
            active[type] ? active[type].call(this, othis) : '';
        });
    });
</script>
<!--日期选择框-->
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#time1' //指定元素
        });
    });
</script>
</body>
</html>